home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / PInterface Translator / PInterfaces / Video.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  5.9 KB  |  181 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Sunday, January 6, 1991 at 11:26 PM
  3.     Video.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.         Copyright Apple Computer, Inc.    1986-1990
  7.         All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Video;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingVideo}
  21. {$SETC UsingVideo := 1}
  22.  
  23. {$I+}
  24. {$SETC VideoIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingQuickdraw}
  27. {$I $$Shell(PInterfaces)Quickdraw.p}
  28. {$ENDC}
  29. {$SETC UsingIncludes := VideoIncludes}
  30.  
  31. CONST
  32. mBaseOffset = 1;            {Id of mBaseOffset.}
  33. mRowBytes = 2;              {Video sResource parameter Id's }
  34. mBounds = 3;                {Video sResource parameter Id's }
  35. mVersion = 4;               {Video sResource parameter Id's }
  36. mHRes = 5;                  {Video sResource parameter Id's }
  37. mVRes = 6;                  {Video sResource parameter Id's }
  38. mPixelType = 7;             {Video sResource parameter Id's }
  39. mPixelSize = 8;             {Video sResource parameter Id's }
  40. mCmpCount = 9;              {Video sResource parameter Id's }
  41. mCmpSize = 10;              {Video sResource parameter Id's }
  42. mPlaneBytes = 11;           {Video sResource parameter Id's }
  43. mVertRefRate = 14;          {Video sResource parameter Id's }
  44. mVidParams = 1;             {Video parameter block id.}
  45. mTable = 2;                 {Offset to the table.}
  46. mPageCnt = 3;               {Number of pages}
  47. mDevType = 4;               {Device Type}
  48.  
  49. oneBitMode = 128;           {Id of OneBitMode Parameter list.}
  50. twoBitMode = 129;           {Id of TwoBitMode Parameter list.}
  51. fourBitMode = 130;          {Id of FourBitMode Parameter list.}
  52. eightBitMode = 131;         {Id of EightBitMode Parameter list.}
  53. sixteenBitMode = 132;       {Id of SixteenBitMode Parameter list.}
  54. thirtyTwoBitMode = 133;     {Id of ThirtyTwoBitMode Parameter list.}
  55.  
  56. firstVidMode = 128;         {The new, better way to do the above.    }
  57. secondVidMode = 129;        {    QuickDraw only supports six video    }
  58. thirdVidMode = 130;         {    at this time.                        }
  59. fourthVidMode = 131;
  60. fifthVidMode = 132;
  61. sixthVidMode = 133;
  62.  
  63. spGammaDir = 64;
  64. spVidNamesDir = 65;
  65.  
  66. { Control Codes }
  67. cscReset = 0;
  68. cscKillIO = 1;
  69. cscSetMode = 2;
  70. cscSetEntries = 3;
  71. cscSetGamma = 4;
  72. cscGrayPage = 5;
  73. cscGrayScreen = 5;
  74. cscSetGray = 6;
  75. cscSetInterrupt = 7;
  76. cscDirectSetEntries = 8;
  77. cscSetDefaultMode = 9;
  78.  
  79. { Status Codes }
  80. cscGetMode = 2;
  81. cscGetEntries = 3;
  82. cscGetPageCnt = 4;
  83. cscGetPages = 4;            { This is what C&D 2 calls it. }
  84. cscGetPageBase = 5;
  85. cscGetBaseAddr = 5;         { This is what C&D 2 calls it. }
  86. cscGetGray = 6;
  87. cscGetInterrupt = 7;
  88. cscGetGamma = 8;
  89. cscGetDefaultMode = 9;
  90.  
  91. TYPE
  92. VPBlockPtr = ^VPBlock;
  93. VPBlock = RECORD
  94.     vpBaseOffset: LONGINT;  {Offset to page zero of video RAM (From minorBaseOS).}
  95.     vpRowBytes: INTEGER;    {Width of each row of video memory.}
  96.     vpBounds: Rect;         {BoundsRect for the video display (gives dimensions).}
  97.     vpVersion: INTEGER;     {PixelMap version number.}
  98.     vpPackType: INTEGER;
  99.     vpPackSize: LONGINT;
  100.     vpHRes: LONGINT;        {Horizontal resolution of the device (pixels per inch).}
  101.     vpVRes: LONGINT;        {Vertical resolution of the device (pixels per inch).}
  102.     vpPixelType: INTEGER;   {Defines the pixel type.}
  103.     vpPixelSize: INTEGER;   {Number of bits in pixel.}
  104.     vpCmpCount: INTEGER;    {Number of components in pixel.}
  105.     vpCmpSize: INTEGER;     {Number of bits per component}
  106.     vpPlaneBytes: LONGINT;  {Offset from one plane to the next.}
  107.     END;
  108.  
  109. VDEntRecPtr = ^VDEntryRecord;
  110. VDEntryRecord = RECORD
  111.     csTable: Ptr;           {(long) pointer to color table entry=value, r,g,b:INTEGER}
  112.     END;
  113.  
  114. { Parm block for SetGray control call }
  115. VDGrayPtr = ^VDGrayRecord;
  116. VDGrayRecord = RECORD
  117.     csMode: BOOLEAN;        {Same as GDDevType value (0=mono, 1=color)}
  118.     END;
  119.  
  120. { Parm block for SetEntries control call }
  121. VDSetEntryPtr = ^VDSetEntryRecord;
  122. VDSetEntryRecord = RECORD
  123.     csTable: ^ColorSpec;    {Pointer to an array of color specs}
  124.     csStart: INTEGER;       {Which spec in array to start with, or -1}
  125.     csCount: INTEGER;       {Number of color spec entries to set}
  126.     END;
  127.  
  128. { Parm block for SetGamma control call }
  129. VDGamRecPtr = ^VDGammaRecord;
  130. VDGammaRecord = RECORD
  131.     csGTable: Ptr;          {pointer to gamma table}
  132.     END;
  133.  
  134. VDPgInfoPtr = ^VDPageInfo;
  135. VDPageInfo = RECORD
  136.     csMode: INTEGER;        {(word) mode within device}
  137.     csData: LONGINT;        {(long) data supplied by driver}
  138.     csPage: INTEGER;        {(word) page to switch in}
  139.     csBaseAddr: Ptr;        {(long) base address of page}
  140.     END;
  141.  
  142. VDSzInfoPtr = ^VDSizeInfo;
  143. VDSizeInfo = RECORD
  144.     csHSize: INTEGER;       {(word) desired/returned h size}
  145.     csHPos: INTEGER;        {(word) desired/returned h position}
  146.     csVSize: INTEGER;       {(word) desired/returned v size}
  147.     csVPos: INTEGER;        {(word) desired/returned v position}
  148.     END;
  149.  
  150. VDSettingsPtr = ^VDSettings;
  151. VDSettings = RECORD
  152.     csParamCnt: INTEGER;    {(word) number of params}
  153.     csBrightMax: INTEGER;   {(word) max brightness}
  154.     csBrightDef: INTEGER;   {(word) default brightness}
  155.     csBrightVal: INTEGER;   {(word) current brightness}
  156.     csCntrstMax: INTEGER;   {(word) max contrast}
  157.     csCntrstDef: INTEGER;   {(word) default contrast}
  158.     csCntrstVal: INTEGER;   {(word) current contrast}
  159.     csTintMax: INTEGER;     {(word) max tint}
  160.     csTintDef: INTEGER;     {(word) default tint}
  161.     csTintVal: INTEGER;     {(word) current tint}
  162.     csHueMax: INTEGER;      {(word) max hue}
  163.     csHueDef: INTEGER;      {(word) default hue}
  164.     csHueVal: INTEGER;      {(word) current hue}
  165.     csHorizDef: INTEGER;    {(word) default horizontal}
  166.     csHorizVal: INTEGER;    {(word) current horizontal}
  167.     csHorizMax: INTEGER;    {(word) max horizontal}
  168.     csVertDef: INTEGER;     {(word) default vertical}
  169.     csVertVal: INTEGER;     {(word) current vertical}
  170.     csVertMax: INTEGER;     {(word) max vertical}
  171.     END;
  172.  
  173.  
  174.  
  175. {$ENDC}    { UsingVideo }
  176.  
  177. {$IFC NOT UsingIncludes}
  178.     END.
  179. {$ENDC}
  180.  
  181.